package controllers

import (
	"net/http"

	"github.com/gin-gonic/gin"

	"cmt1-admin/lib/request"
)

type UserHeroQuery struct {
	BaseRequest
	Name string `form:"name"`
}

//转发请求，通过用户uid查看用户宠物信息
func GetHerosByUid(c *gin.Context) {
	uid := c.Param("uid")
	//转发请求，请求游戏服务器
	res, err := request.Get("userHero/info/" + uid)
	if err != nil {
		handleErr(c, 401, err.Error())
		return
	}
	c.Writer.Header().Set("content-type", "application/json")
	c.String(http.StatusOK, string(res))
}
